<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <script>
    // 起始值  变量变化
    // let num =1
    // while (num <= 10){
    //   alert('zbc')
    // num++
    // }
    let n = prompt('请输入你要打印的次数：')
    let i = 1
    while (i <= n){
      document.write(`我要打${i}次<br>`)
      i++
    }
  </script>
</body>
</html>